<template>
  <div class="app-container">

    <!-- 表格 -->
    <div class="filter-container">
      <!--<el-button v-waves :loading="downloadLoading" class="filter-item" type="primary" @click="handleDownload">-->
        <!--添加求购订单-->
      <!--</el-button>-->
      <el-table :data="tableData" class="data_table" style="width: 100%;">
        <el-table-column prop="number" label="编号" width="180">
          <template slot-scope="{row}">
            <span>{{ row.h_id }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="name" label="姓名" width="180">
          <template slot-scope="{row}">
            <span>{{ row.h_name }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="info" label="描述">
          <template slot-scope="{row}">
            <span>{{ row.h_address }}</span>
          </template>
        </el-table-column>
      </el-table>
    </div>

    <!--表单-->


  </div>
</template>

<script>
import axios from 'axios'
export default {
  name: 'test.vue',
  data () {
    return {
      tableData: [{
        number: '2016001',
        name: '小明',
        info: '这是第一条数据'
      }, {
        number: '2016002',
        name: '小明',
        info: '这是第二条数据'
      }, {
        number: '2016003',
        name: '小明',
        info: '这是第三条数据'
      }, {
        number: '2016004',
        name: '小明',
        info: '这是第四条数据'
      }, {
        number: '2016005',
        name: '小明',
        info: '这是第五条数据'
      }]
    }
  },
  methods: {
    init(){
      console.log("初始化")
      axios.get('http://localhost:8088/secondhouse/housecontroller/reviewhouse').then(request=>{
        console.log("request" + request)
        var Data=request.data
        console.log("requestData" + Data[0].h_id)
        this.tableData = Data
      })
    }
  },
  handleDownload() {

  },
  mounted(){
    this.init()
  }
}
</script>

<style scoped>

</style>
